package su.test.OneWayEncryption;

import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;

/**
 * @author SuZuQi
 * @title: EncryMd5
 * @projectName myEncry
 * @description: 使用md5加密 Message-Digest Algorithm
 * @date 2019/12/17
 */
public class EncryMd5 {

    public static void main (String[] args ) throws NoSuchAlgorithmException {
        MessageDigest md5 = MessageDigest.getInstance("MD5");
        String message = "When does Miss Huang come from Wuhan ";
        md5.update(message.getBytes());
        byte[] by = md5.digest() ;
        System.out.println(new String(by));
    }
}
